package com.carb.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 用户角色 (0: 管理员, 1: 员工, 2: 会员)
 */
@Getter
public enum UserRole {
    ADMIN(0, "管理员"),
    EMPLOYEE(1, "员工"),
    MEMBER(2, "会员");

    @EnumValue
    private final int code;
    @JsonValue
    private final String desc;

    UserRole(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
